EXTEND #2: Let's update the value of rect_perim as we change the size of the rectangle!
- Inside mouse_move(), recalculate the value of rect_perim using x as the rectangle's width and y as the height. This updates the value of rect_perim each time the mouse moves!
- Add Update Display inside the event. Edit it to update the perimeter display with rect_perim.
- Click Run and try moving your mouse! Do you see the value of rect_perim changing?
To navigate the page using the TAB key, first press ESC to exit the code editor.